﻿<controls:ChildWindow
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"           
           xmlns:commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
           x:Class="VisualStock.Modules.StockSymbols.ComparingSymbols.AddNewSymbolWindowView"
           Width="400" Height="300" mc:Ignorable="d" Title="Add new data">

    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.Resources>
            <Style x:Key="TextBlockStyle" TargetType="TextBlock">
            	<Setter Property="Margin" Value="0,0,5,0"/>
            	<Setter Property="FontSize" Value="14.667"/>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel d:LayoutOverrides="Width">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Symbol:" Style="{StaticResource TextBlockStyle}"/>
                <TextBlock Text="{Binding Symbol}" Style="{StaticResource TextBlockStyle}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
            	<TextBox Text="{Binding DownloadUrl}" IsReadOnly="True" Width="340" FontSize="12" Margin="0,0,5,0"/>
            	<HyperlinkButton FontSize="14.667" TargetName="_blank" NavigateUri="{Binding DownloadUrl}" Content="Get" ToolTipService.ToolTip="Go to the yahoo donwload page"/>
            </StackPanel>
            <TextBlock HorizontalAlignment="Left" Text="Do you have the data?" TextWrapping="Wrap" Margin="0,10,0,0"/>
            <RadioButton Content="Yes, I want to import it now" Margin="0,10,0,0" IsChecked="{Binding IsImport, Mode=TwoWay}"/>
            <RadioButton Content="No, I want the application to downtoad it for me(*)" Margin="0,10,0,0"/>
        </StackPanel>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1"/>
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" commands:Click.Command="{Binding OkCommand}"
                Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
        <TextBlock Text="*After the data is downloaded successfully, it will appear in your symobl list" TextWrapping="Wrap" Grid.Row="2"/>

    </Grid>
</controls:ChildWindow>